package com.xxx.delayjob.controller;

import com.xxx.delayjob.listener.SystemListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * demo Controller
 */
@Controller
@RequestMapping(value = "/", produces = "application/json;charset=utf-8")
public class DemoController extends BaseController {
	
	private static final Logger logger = LoggerFactory.getLogger(DemoController.class);
	
	/**
	 * 默认模板
	 */
	@RequestMapping("/")
	public String index(){
		return "index";
	}

	/**
     * 系统启动时间戳
     */
    @RequestMapping("/versionNo")
    @ResponseBody
    public String versionNo(){
    	logger.info("enter method versionNo().");
        return SystemListener.versionNo;
    }

}
